from tortoise import models, fields


class Meals(models.Model):
    ID = fields.IntField(pk=True)
    Dish_name = fields.CharField(max_length=255)
    Category = fields.CharField(max_length=255)
    Taste = fields.CharField(max_length=255)
    Ingredients = fields.CharField(max_length=255)
    Main_Technique = fields.CharField(max_length=255)
    Cooking_Time = fields.CharField(max_length=255)
    Method = fields.CharField(max_length=511)
    Image_URL = fields.CharField(max_length=16384)
    meal_type_y = fields.CharField(max_length=255)
    Calories = fields.FloatField(max_length=255)
    Carbohydrates_y = fields.FloatField(max_length=255)
    Fat_y = fields.FloatField(max_length=255)
    Protein_y = fields.FloatField(max_length=255)
    Fiber_y = fields.FloatField(max_length=255)
    add_time = fields.DatetimeField(null=True)
    fav_num = fields.IntField(default=0)
    view_num = fields.IntField(default=0)
    User_List = fields.CharField(max_length=255,default="[]")
              
